/**
 * @author ：FeatherWaves
 * @description：TODO
 * @date ：2021/8/17 9:10
 */
class Value {
    private int a;

    public Value(int a) {
        this.a = a;
    }

    public int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }
}
public class Test {
    public static void Swap(Value v1, Value v2) {
        int tmp = v1.getA();
        v1.setA(v2.getA());
        v2.setA(tmp);
    }
    public static void main(String[] args) {
        Value v1 = new Value(10);
        Value v2 = new Value(20);
        System.out.println(("a:" + v1.getA() + " " + "b:" + v2.getA()));
        Swap(v1, v2);
        System.out.println(("a:" + v1.getA() + " " + "b:" + v2.getA()));

    }
}
